<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<input type="file" value="上传" id="theFile">
<script>
    const fileDom = document.querySelector('#theFile')
    fileDom.addEventListener('change',e =>{
        console.log(e.target.files)
    })
</script>
</body>
</html>